#ifndef MATHALGS_H
#define MATHALGS_H

//! Check and set min and max from new_value variable
template <typename T>
void SetMinMax(T new_value, T & min, T max)
{
    if (new_value < min)
        min = new_value;
    if (new_value > max)
        max = new_value;
}

#endif // MATHALGS_H
